<?php
namespace app\index\model;//命名空间
use think\Model; //引入模型类
//模型
class WebsiteLink extends Model{
	
	public function add($data){		
	  return  $this->save($data);
	}
	public function getList(){
		$where=[
		['status','=',0],
//		['id','between','1,8'],
//		['title','like','thinkphp%'],
//		['remark','like',['%think','php%'],'OR']
		];
		$order=[
			'sort'=>'asc',
			'create_time'=>'asc',
		];
		return $this->field('id,website_name,website_logo,href,remark,sort,status,create_time,update_time')
					//->limit(3)
					->where($where)
					->order($order)
//					->select();
		            ->paginate(5);
	}
	
}
